import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SEntityId } from "./SEntityId";
type int = number;
//class SWrestleBuyShopItem
    
    export  class SWrestleBuyShopItem extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SWrestleBuyShopItem();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.gateChannelId);
            this.entityId.__write(arg1);
            arg1.writeInt(this.itemCode);
            arg1.writeInt(this.amount);
            arg1.writeInt(this.shopCode);
            arg1.writeInt(this.npcId);
            arg1.writeInt(this.cost);
            arg1.writeInt(this.unit);
            arg1.writeInt(this.minMark);
            arg1.writeInt(this.teamMark);
            arg1.writeInt(this.maxBuyNum);
            arg1.writeBool(this.buySuccess);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.gateChannelId = arg1.readInt();
            this.entityId = new SEntityId();
            this.entityId.__read(arg1);
            this.itemCode = arg1.readInt();
            this.amount = arg1.readInt();
            this.shopCode = arg1.readInt();
            this.npcId = arg1.readInt();
            this.cost = arg1.readInt();
            this.unit = arg1.readInt();
            this.minMark = arg1.readInt();
            this.teamMark = arg1.readInt();
            this.maxBuyNum = arg1.readInt();
            this.buySuccess = arg1.readBool();
            return;
        }

        public /* const */_type: int=619;

        public /* var */gateChannelId: int;

        public /* var */entityId: SEntityId;

        public /* var */itemCode: int;

        public /* var */amount: int;

        public /* var */shopCode: int;

        public /* var */npcId: int;

        public /* var */cost: int;

        public /* var */unit: int;

        public /* var */minMark: int;

        public /* var */teamMark: int;

        public /* var */maxBuyNum: int;

        public /* var */buySuccess: Boolean;

        public static /* var */_regist: SWrestleBuyShopItem;
    }

            SWrestleBuyShopItem._regist = new SWrestleBuyShopItem(true);
        